module SpiderHelper
  def remove_query_string(url)
    url.split("?").first
  end

  def append_to_file(s,file)
    f = file ? open(file,'a') : STDOUT
    f.puts s
    f.close unless f == STDOUT
  end
end
